package com.charactereducation.pitchpalace.service;

import com.charactereducation.module.vo.User;
import com.charactereducation.tools.myRunTime.MyRunTimeExcption;

import java.util.List;
import java.util.Map;

/**
 * Created by Baggio on 2019-2-14.
 */
public interface UserService {
    /**
     * 获取用户
     * @param userId
     * @return
     * @throws MyRunTimeExcption
     */
    User getUserById(Long userId) throws MyRunTimeExcption;

    /**
     * 登录
     * @param phone
     * @param passWord
     * @return
     * @throws MyRunTimeExcption
     */
    User Login(String phone, String passWord) throws MyRunTimeExcption;

    /**
     * 注册
     * @param user
     * @return
     * @throws MyRunTimeExcption
     */
    User register(User user) throws MyRunTimeExcption;

    /**
     * 重置密码
     * @param phone
     * @throws MyRunTimeExcption
     */
    void resetPasword(String phone) throws MyRunTimeExcption;

    /**
     * 更新用户信息
     * @param user
     * @throws MyRunTimeExcption
     */
    void modifyUser(User user) throws MyRunTimeExcption;

    /**
     * 获取用户列表
     * @param map
     * @return
     * @throws MyRunTimeExcption
     */
    List<User> getUserList(Map<String, String> map) throws MyRunTimeExcption;

    String getSMSCode(String phone)throws MyRunTimeExcption;
}
